package day06;

public class Method {
    public static void main(String[] args) {
        say();
        sayHi("Lee");
        sayHello("帅哥",24);
        double a =getNum();
        System.out.println(a);
        int b =pius(6,7);
        System.out.println(b);
        int[] c = testArray(10,100);
        for (int i  = 0;i<c.length;i++){
            System.out.println(c[i]);
        }
    }
    public static void say(){
        System.out.println("我叫李延");
    }
    public static void sayHi(String name){
        System.out.println("我叫"+name);
    }
    public static void sayHello(String name,int age){
        System.out.println("我叫"+name+",今年"+age+"岁了");
    }
    public static double getNum(){
        return 0.6;
    }
    public static int pius(int num1,int num2){
        int num = num1+ num2;
        return num;
    }
    public static int[] testArray(int len,int max){
        int[] arr = new int[len];
        for (int i = 0;i<arr.length;i++){
            arr[i] =(int)(Math.random()*(max+1));
        }
        return arr;
    }
}
